<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>Document</title>
  <script src="https://cdn.bootcdn.net/ajax/libs/jquery/3.5.1/jquery.js"></script>
</head>
<body>
  <h1>hello world</h1>
  <!--{% block content %}-->
    {{ name1 }}
  <!--{% endblock %}-->
  <input type="text" placeholder="{{ name1 }}"></input>
  <input type="password" placeholder="password"></input>
  <button onclick="loginClick()">submit</button>
  <script>
    function loginClick() {
      //alert('click login btn');
      $.ajax({
        url: '/auth',
        method: 'post',
        data: {
          username: 'zmy',
          password: 'password',
        },
        success: function(result) {
          console.log('success', result);
        },
        error: function(err) {
          console.log('error', err);
        }
      });
    }
  </script>
</body>
</html>